﻿package com.quickdev.intelligenthome.net.data {
	import com.adobe.serialization.json.JSON;
	import com.quickdev.intelligenthome.predef.AppPredef;
	import com.quickdev.intelligenthome.config.Config;
	
	public class DeviceSwitchRequest extends Base {
		public var devType :uint;
		public var seq :String;
		public var ctrl :uint;
		
		public function DeviceSwitchRequest() {
			// constructor code
			super();
			msgType = AppPredef.REQUEST_DEVICE_SWITCH;
			userNo = Config.userNo;
		}
		
		override public function encode() :String {
			var obj :Object = new Object();
			obj.msgType = msgType;
			obj.userNo = userNo;
			obj.devType = devType;
			obj.seq = seq;
			obj.ctrl = ctrl;
			
			return JSON.encode( obj );
		}

	}
	
}
